﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Vit.Common;
using Vit.Web.Mvc.DataAnnotations;

namespace Vit.Web.Models
{
    public class FriendlyUrl
    {
        [Key]
        [StringLength(50)]
        [ShowFor(false, false, true, false)]
        [HiddenInput(DisplayValue = false)]
        public string ID { get; set; }
        [Required]
        [StringLength(500)]
        [DataType(DataType.MultilineText)]
        [UIHint("DialogLink", null, "url", "/Admin/FriendlyUrl/Edit/{ID}")]
        public string UrlPattern { get; set; }
        [Required]
        [StringLength(500)]
        [DataType(DataType.MultilineText)]
        public string RewriteUrl { get; set; }

        public bool IsRegex { get; set; }
    }
}
